package com.example.combwyaq.visualinterface.video;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;

import com.example.combwyaq.R;
import com.example.combwyaq.visualinterface.video.adapter.VideoVpAdapter;
import com.flyco.tablayout.SlidingTabLayout;

public class VideoFragment extends Fragment {

    private View rootView;
    private SlidingTabLayout video_tab;
    private ViewPager video_vp;

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        rootView = inflater.inflate(R.layout.fragment_video,container,false);
        init();
        return rootView;
    }

    private void init(){
        video_tab = rootView.findViewById(R.id.video_tab);
        video_vp = rootView.findViewById(R.id.video_vp);
        video_vp.setAdapter(new VideoVpAdapter(getFragmentManager()));
        video_tab.setViewPager(video_vp);
    }

}
